Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Using JavaScript source files
If you develop JavaScript routines that are long and that are common to a number of applications, you may want to keep them in separate JavaScript source (
.js) files.When deploying JavaScript source files, you must put them in the Web server’s root directory or in a subdirectory of the Web server’s root directory. You can then reference the file using the HTML SRC attribute. For example, the following calls
myscript.js, which is injsscriptsa subdirectory of the Web server’s root directory:
You can also create references to JavaScript source files within Embedded SpeedScript. However, you must be careful to specify the complete
<SCRIPT>tag expression and to escape the expression using back tics. For example, the following code snippet will not run the JavaScript file:
The problem is fixed when you assign the complete
<SCRIPT>tag expression to the variable and enclose it in back tics, as shown:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |